package com.example.anliku.mapper;
import org.apache.ibatis.annotations.Param;

import com.example.anliku.entity.Example;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface ExampleMapper {
    int deleteByPrimaryKey(Integer exampleId);

    int insert(Example record);

    int insertSelective(Example record);

    Example selectByPrimaryKey(Integer exampleId);

    int updateByPrimaryKeySelective(Example record);

    int updateByPrimaryKey(Example record);

    List<Example> selectAll();

    int updateExampleStateAndDecExamplePassTimeAndExampleCheckIdAndDecExampleAdviceByExampleId(@Param("updatedExampleState")Integer updatedExampleState,@Param("deductedExamplePassTime")Date deductedExamplePassTime,@Param("updatedExampleCheckId")String updatedExampleCheckId,@Param("deductedExampleAdvice")String deductedExampleAdvice,@Param("exampleId")Integer exampleId);

    List<Example> selectexampleUserIdByexample(@Param("exampleUserId") String exampleUserId);

    List<Example> selectAllByExampleUserIdAndExamplePublicState(@Param("exampleUserId")String exampleUserId,@Param("examplePublicState")Integer examplePublicState);

    List<Example> selectAllByExampleTypeNameAndExamplePublicStateAndExampleState(@Param("exampleTypeName")String exampleTypeName,@Param("examplePublicState")Integer examplePublicState,@Param("exampleState")Integer exampleState);

    List<Example> selectByExampleUserId(@Param("exampleUserId")String exampleUserId);

    List<Example> selectAllByExamplePublicStateAndExampleState(@Param("examplePublicState")Integer examplePublicState,@Param("exampleState")Integer exampleState);

    List<Map> selectByAll();

}
